package org.example.aienglishapp_login.dto.login;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class VerificationCodeRegisterDTO {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "请输入有效的11位手机号")
    private String phoneNumber;

    @NotBlank(message = "验证码不能为空")
    private String verificationCode;

    @NotBlank(message = "密码不能为空")
    private String userpassword;

    // 无参构造函数
    public VerificationCodeRegisterDTO() {
    }

    @Override
    public String toString() {
        return "PhoneNumberRegisterDTO{" +
                "phoneNumber='" + phoneNumber + '\'' +
                ", verificationCode='" + verificationCode + '\'' +
                ", userpassword='" + userpassword + '\'' +
                '}';
    }
}